1. Field of the Invention
The present invention generally relates to a microcomputer having an erasable programmable ROM (EPROM) built therein. More particularly, the present invention is concerned with a procedure for correcting errors of a microcomputer having thereinside a one-time PROM which is one of EPROMs available today and allows data to be written therein only once.
2. Description of the Prior Art
Some modern single-chip microcomputers applicable to IC cards, for example, have an EPROM built therein. This type of microcomputer allows the user to write a microcomputer application program or data therein as desired and, therefore, promotes the cut-down of development turn-around time (TAT). A one-time PROM (OTP) belongs to a family of EPROMs and has a package which is not provided with a window for erasing data. Such a one-time PROM is inexpensive although data cannot be written therein more than once.
An EPROM has a FAMOS structure, i.e., it is implemented as a silicon gate MOS type FET which is provided with a floating gate. Such a FET stores data "0" when an electron is injected into and stored in the floating gate or data "1" when no electrons are injected. Generally, the data stored in this type of EPROM may be erased by applying ultraviolet rays thereto. With a one-time PROM, however, it is impossible to erase data because this type of PROM is implemented by an inexpensive plastic mold package which has no windows for admitting the radiation. For details of an EPROM and a one-time ROM, a reference may be made to Natsui "MOS Memory: EPROM, Ultra-LSI Technology & Application", No. 3, pp. 37-42, Ohm Sha, Japan, and "Operative Analysis and Testing Methods for EPROMs", Nikkei Electronics, Independent Volume, pp. 181-201 (1981).
Since a one-time PROM inhibits data written therein from being erased and does not allow data to be written therein more than once, a one-chip microcomputer loaded with a one-time PROM has some problems, as follows. Specifically, once the one-time PROM is loaded in a package, it cannot be subjected to a writing test during the course of production and, consequently, it is delivered to a customer without being fully tested. This brings about a fear that defective products which will not allow users to write data therein are delivered together with defectless products. Although some of such defective one-time PROMs may safely write data therein, the charges stored in the floating gates will disappear in due course due to the short operation margin and, as a result, the stored data will be changed. The user, therefore, cannot use a one-time PROM without once writing data in the PROM, then baking it over a predetermined period of time, and then checking the data for changes in order to confirm the operation margin. As discussed above, since a writing test is impracticable with a one-time PROM in the production line after it has been loaded in a package, the probability that a writing error occurs at the users stage is high. It has been reported that the ratio of such defective products is as great as 1% to 0.1%, limiting the reliability of data writing available with a one-time ROM.
In the light of the above, the inventor has proposed a microcomputer having an implementation for making up for the disadvantages of a one-time PROM, as shown and described in Japanese Patent Laid-Open Publication No. 173147/1989. The microcomputer disclosed in this Patent Publication is capable of correcting errors when data are read out of a one-time PROM.
However, the microcomputer disclosed in the above Patent Publication has a problem stemming from the fact that it corrects errors by program control, i.e. software. Specifically, this microcomputer needs a great number of instructions for reading data out of a real address X and a dummy address Y of a one-time ROM which are loaded with the same data, and ANDing the read data. An increase in the number of instructions directly translates into an increase in the number of processing steps and, therefore, into an increase in processing time.